import request from "@/utils/request";
import {H5_APP_ID, HTTP_REQUEST_URL} from "@/config/app";

/**
 * 升级合伙人需要 分享新用户人数
 * @param params
 * @returns {Promise<*>}
 */
export function shareNumApi (params) {
    return request.get('/config/spread/num')
}

/**
 * 首页推广是否显示
 * @param params
 * @returns {Promise<*>}
 */
export function showShareApi (params) {
    return request.get('/config/spread/status')
}

/**
 * 可免费查询次数 新接口 暂时没用  需修改之前的接口
 * @param params
 * @returns {Promise<*>}
 * @constructor
 */
export function SearchNumApi (params) {
    return request.get('/config/report/free/limit')
}

/**
 * 分享朋友
 * @param params
 * @returns {Promise<*>}
 */
export function shareToFriend (params) {
    return request.get(`${HTTP_REQUEST_URL}/wx/mp/jsapi/${H5_APP_ID}/getJsapiTicket?url=${params.url}`)
}